package cn.sofwin.day0127.homework.Phone;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        HandSet phone = null;
        String brand = null, version = null;
        int type = 0;
        System.out.println("请输入手机类型（1.小灵通 2.智能机）：");
        type = sc.nextInt();
        System.out.print("请输入手机品牌：");
        brand = sc.next();
        System.out.print("请输入手机型号：");
        version = sc.next();
        switch (type) {
            case 1:
                phone = new CommonHandSet(brand, version);
                break;
            case 2:
                phone = new AptitudeHandSet(brand, version);
                break;
            default:
                System.out.println("输入有误");
                return;
        }
        phone.info();
    }
}
